package com.springboot.dubbo.base.po.oracle;

import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.code.ORDER;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @program: bjjy-jzyx-parent
 * @description: 话单录音表
 * @author: 杨冬冬
 * @create: 2019-08-15 14:01
 **/
@Data
@Table(name = "CALLRECORD")
public class CallRecord implements Serializable {

    @Id
    @KeySql(sql = "select CALLRECORD_SEQ_ID.nextval from dual", order = ORDER.BEFORE)
    @ColumnType(column = "ID", jdbcType = JdbcType.VARCHAR)
    private String id;

    /*
     * 代理商id
     **/
    @ColumnType(column = "AGENTID", jdbcType = JdbcType.VARCHAR)
    private String agentId;

    /*
     * 绑定 ID：唯一标示一组绑定关系的 ID，和多号平台生成。
     **/
    @ColumnType(column = "BINDID", jdbcType = JdbcType.VARCHAR)
    private String bindId;

    /*
     * 通话 ID: 唯一标示一次通话的 ID，和多号平台根据通话生成。
     **/
    @ColumnType(column = "CALLID", jdbcType = JdbcType.VARCHAR)
    private String callId;

    /*
     * 录音地址
     **/
    @ColumnType(column = "RECORDURL", jdbcType = JdbcType.VARCHAR)
    private String recordUrl;

    /**
     * 吉亚内部绑定ID，正常绑定解绑情况下，此ID与BINDID字段相同
     */
    @ColumnType(column = "JYBINDID", jdbcType = JdbcType.VARCHAR)
    private String jyBindId;

    /**
     * 0: 未下载
     * 1：下载成功
     * 2：下载失败
     * 3：代理商未开启下载
     */
    @ColumnType(column = "ISDOWN", jdbcType = JdbcType.VARCHAR)
    public Integer isDown;

    /*
     * 话单插入时间
     **/
    @ColumnType(column = "INSERTDATE", jdbcType = JdbcType.TIMESTAMP)
    private Date insertDate;
}
